<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
   class Person{
    name = "孙悟空"
    sayHello(){  // 实例方法
        console.log(this.name);
    }
    static test(){  // 类方法
        console.log('我是类方法');
    }
   }
</script>
</html>